import Vue from 'vue';
import VueRouter from 'vue-router';
import example from "./components/Example"
import AuthorizedClients from "./components/passport/AuthorizedClients";
import PersonalAccessTokens from "./components/passport/PersonalAccessTokens";
import AuthClients from "./components/passport/Clients";
import routes from './route'
import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap/dist/js/bootstrap.min'

require('./bootstrap');
import $ from 'jquery'
/**
 * First we will load all of this project's JavaScript dependencies which
 * include Vue and Vue Resource. This gives a great starting point for
 * building robust, powerful web applications using Vue and Laravel.
 */
Vue.use(VueRouter);
//Vue.component(example,AuthClients,AuthorizedClients,PersonalAccessTokens);
// 路由配置
const RouterConfig = {
    routes
};
const router = new VueRouter(RouterConfig);
require('./bootstrap');

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */
// 全局注册　
Vue.component('example-component', require('./components/Example.vue').default);
Vue.component('passport-authorized-clients',require('./components/passport/Clients.vue').default);
Vue.component('personal-access-tokens',require('./components/passport/PersonalAccessTokens.vue').default);
Vue.component('authorized-clients',require('./components/passport/AuthorizedClients.vue').default);

const app = new Vue({
    el: '#app',
    router: router,
    components:{
        example,
        AuthorizedClients,
        PersonalAccessTokens,
        AuthClients
    },
    render: h => h(example)
});
